package com.pjchat.pjchatclient.testserver;

import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class TestServer {
	public static void main(String[] args) throws IOException,
			ClassNotFoundException {
		ServerSocket server = new ServerSocket(6666);
		while (true) {
			Socket socket = server.accept();
			InputStream is = socket.getInputStream();
			ObjectInputStream ois = new ObjectInputStream(is);
			OutputStream os = socket.getOutputStream();
			ObjectOutputStream oos = new ObjectOutputStream(os);

		}
		// while (true) {
		// Unit unit = (Unit) ois.readObject();
		// if (unit != null) {
		// Unit result = new Unit();
		// result.setType(UnitType.USER_LOGIN);
		// if (UnitType.USER_LOGIN.equals(unit.getType())) {
		// result.setSuccess(false);
		// } else {
		// result.setSuccess(true);
		// }
		// oos.writeObject(result);
		// }
		// }
	}
}
